﻿<div ng-controller="Monitor.SdbOverview.NodesSync.Ctrl" ng-container="{}">
   <div style="background:#F4F4F4;" ng-container="{height:57}">
      <div class="nav-new">
         <div class="active" ng-click="GotoNodes()">{{autoLanguage("节点")}}</div>
         <div ng-click="GotoResources()">{{autoLanguage("资源")}}</div>
         <div ng-click="GotoHostList()">{{autoLanguage("主机")}}</div>
      </div>
   </div>
   <div style="padding:8px 15px 10px 15px;" ng-container="{offsetY:-60}">
      <div class="underlineTab" style="padding-top:10px;border-top:2px solid #F0F0F0;" ng-container="{height:50,marginTop:10}">
         <ul class="left">
            <li>
               <a href="#/Monitor/SDB-Nodes/Nodes">{{autoLanguage("节点列表")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/Groups">{{autoLanguage("分区组列表")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/Charts">{{autoLanguage("图表")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/GroupsSnapshot">{{autoLanguage("分区组快照")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/NodesSnapshot">{{autoLanguage("节点快照")}}</a>
            </li>
            <li class="active">
               <a href="#/Monitor/SDB-Nodes/NodesSync">{{autoLanguage("节点数据同步")}}</a>
            </li>
         </ul>
      </div>

      <div style="height:30px;margin:10px 0;">
         <div ng-dropdown="config in SelectorMenu.config" dropdown-callback="SelectorMenu.callback">
            <label class="Ellipsis" style="padding:5px 10px;display:block;" ng-click="SelectorMenu.OnClick($index)"><input type="radio" ng-checked="config.checked" />&nbsp;{{config.field}}</label>
         </div>
         <button class="btn btn-default" ng-click="OpenBrushWindows()">
            <span>{{sprintf(autoLanguage("刷新间隔： ? 秒"), IntervalTimeConfig.interval)}}</span>
         </button>&nbsp;
         <button class="btn btn-default" ng-click="RefreshCtrl()">{{RefreshType}}</button>&nbsp;
         <button class="btn btn-default" ng-click="ShowSelectorMenu($event)">
            {{autoLanguage("节点显示方式")}}&nbsp;<i class="fa fa-caret-down"></i>
         </button>
      </div>

      <div ng-windows="config as CreateBrush.config" windows-callback="CreateBrush.callback">
         <div form-create para="config"></div>
      </div>

      <div create-timer="Timer.config" timer-callback="Timer.callback"></div>
      <div ng-container="{offsetY:-112}" ng-table="NodeTable['options']" table-title="NodeTable['title']" table-content="nodeInfo in NodeTable['body']" table-callback="NodeTable['callback']">
         <div class="Ellipsis" table-key="ServiceStatus">
            <i class="fa fa-circle" ng-style="{true:{'color':'#00CC66'},false:{'color':'#D9534F'}}[nodeInfo['ServiceStatus']]"></i>&nbsp;
            <span ng-if="nodeInfo['ServiceStatus'] == true">{{autoLanguage('正常')}}</span>
            <span ng-if="nodeInfo['ServiceStatus'] == false && nodeInfo['Status'].length > 0">{{nodeInfo['Status']}}</span>
            <span ng-if="nodeInfo['ServiceStatus'] == false && nodeInfo['Status'].length == 0">{{sprintf(autoLanguage('异常, 错误码: ?。'),nodeInfo['Flag'])}}</span>
         </div>
         <div class="Ellipsis" table-key="NodeName">
            <a class="linkButton" ng-click="GotoNode(nodeInfo['HostName'],nodeInfo['ServiceName'])">{{nodeInfo['NodeName']}}</a>
         </div>
         <div class="Ellipsis" table-key="HostName">
            <a class="linkButton" ng-click="GotoHostInfo(nodeInfo['HostName'])">{{nodeInfo['HostName']}}</a>
         </div>
         <div class="Ellipsis" table-key="GroupName">
            <a class="linkButton" ng-click="GotoGroup(nodeInfo['GroupName'])">{{nodeInfo['GroupName']}}</a>
         </div>
         <div class="Ellipsis" ng-style="{true:{'font-weight':'bold','color':'#D9534F'}}[nodeInfo['IsPrimary']==true]" table-key="$auto">
            <!--<span ng-style="{'1':{'color':'#D9534F','font-weight':'bold'},'-1':{'color':'#00CC66','font-weight':'bold'},'0':{'color':'#000','font-weight':'normal'}}[$autoValue == LastValue[nodeInfo['i']].$auto ? '0' : ( $autoValue > LastValue[nodeInfo['i']].$auto ? '1' : '-1' )]">-->
            <span>
               <span>{{$autoValue}}</span>
            </span>
         </div>
      </div>
      
   </div>
</div>